import React from 'react';
import {

} from 'react-native';
import { NavigationContainer} from '@react-navigation/bottom-tabs';
import Ionicons from 'react-native-vector-icons/Ionicons';
import InquiryTasks from './InquiryTasks/InquiryTasks';
import OrderTasks from './OrderTasks/OrderTasks';
import Me from './Me/Me';
const Tabs=NavigationContainer();
export default class Home extends React.Component{
    constructor(props) {
        super(props);
    }
    render(){
        return (
            <Tabs.Navigator
                screenOptions={({ route }) => ({
                    tabBarIcon: ({ focused, color, size }) => {
                        let iconName;
                        if (route.name === 'inquiryTasks') {
                            iconName = 'ios-home';
                        } else if (route.name === 'orderTasks') {
                            iconName = "ios-list";
                        }else{
                            iconName="ios-person";
                        }
                        return <Ionicons name={iconName} size={size} color={color} />;
                    },
                })}
                tabBarOptions={{
                    activeTintColor: '#1678ff',
                    inactiveTintColor: '#666',
                }}
            >
                <Tab.Screen name="inquiryTasks" component={InquiryTasks} options={{title:'询价任务'}}/>
                <Tab.Screen name="orderTasks" component={OrderTasks} options={{title:'订单任务'}} />
                <Tab.Screen name="me" component={Me} options={{title:'我的'}} />
            </Tabs.Navigator>
        )
    }
}
